import 'package:PollOnLine/ui/home/home_view.dart';
import 'package:PollOnLine/ui/my/my_view.dart';
import 'package:PollOnLine/ui/my/my_view_ipad.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import '../../r.dart';
import '../home/home_view_ipad.dart';

class MainState {
  // 当前页面索引
  late int currentIndex;

  // 底部导航
  late List<Tabs> tabs;

  // page
  late List<Widget> pages = [];
  late List<Widget> pages_ipad = [];

  MainState() {
    ///Initialize variables
    currentIndex = 0;

    tabs = [
      Tabs("调查任务", R.assetsImgBar1, R.assetsImgBar2),
      Tabs("我的", R.assetsImgBar3, R.assetsImgBar4),
    ];

    pages.add(const HomePage(title: "首页"));
    pages.add(const MyPage(title: "我的"));
    pages_ipad.add(const HomePageIpad(title: "我的"));
    pages_ipad.add(const MyPageIpad(title: "我的"));
  }
}

class Tabs {
  final String title;
  final String icon;
  final String activeIcon;

  Tabs(this.title, this.icon, this.activeIcon);
}
